%if application("udate")=true then response.redirect "../probihaupdate.html" end if%>
Untitled
<%
randomize
if request.querystring("trizeni")<>"" then
cislo=int(request.querystring("trizeni"))
else
cislo=int(rnd*7)
end if
if cislo<=1 then orderek=" zbozi.nazev;" end if
if cislo=2 then orderek=" zbozi.nazev desc;" end if
if cislo=3 then orderek=" zbozi.kod;" end if
if cislo=4 then orderek=" zbozi.kod desc;" end if
if cislo=5 then orderek=" zbozi.moc;" end if
if cislo=6 then orderek=" zbozi.moc desc;" end if
if cislo>6 then orderek=" zbozi.obr;" end if
dim pomocna,dbconnection,recordset,odpovedcislo,jonebone
set dbconnection=server.createobject("adodb.connection")
pomocna="driver={microsoft access driver (*.mdb)}; "
pomocna=pomocna & "dbq=" & server.mappath("admin/forum.mdb")
dbconnection.open pomocna
set recordset=server.createobject("adodb.recordset")
recordset.activeconnection=dbconnection
recordset.cursortype=1
recordset.locktype=3
if request.querystring("method")="search" then
if request.querystring("prodejna")<>"" then
textik="SELECT * FROM Dostupnost INNER JOIN Zbozi ON Dostupnost.kod = Zbozi.Kod WHERE zbozi.kategorie=" & request.querystring("kat")
if request.querystring("podkat")<>"" then
textik=textik & " and zbozi.podkategorie=" & request.querystring("podkat")
end if
if request.querystring("delka")<>"" then
textik=textik & " and zbozi.delka=" & request.querystring("delka")
end if
if request.querystring("akce")="on" and request.querystring("novinka")="on" then
if request.querystring("akce")="on" then
textik=textik & " and zbozi.akce>0"
end if
if request.querystring("novinka")="on" then
textik=textik & " or zbozi.novinka=true"
end if
else
if request.querystring("akce")="on" then
textik=textik & " and zbozi.akce>0"
end if
if request.querystring("novinka")="on" then
textik=textik & " and zbozi.novinka=true"
end if
end if
if request.querystring("prodejna")<>"" then
textik=textik & " and dostupnost.dostupnost='" & request.querystring("prodejna") &"'"
end if
textik=textik &" order by" & orderek
recordset.open textik
else
textik="SELECT * FROM Zbozi WHERE zbozi.kategorie=" & request.querystring("kat")
if request.querystring("podkat")<>"" then
textik=textik & " and zbozi.podkategorie=" & request.querystring("podkat")
end if
if request.querystring("delka")<>"" then
textik=textik & " and zbozi.delka=" & request.querystring("delka")
end if
if request.querystring("akce")="on" and request.querystring("novinka")="on" then
if request.querystring("akce")="on" then
textik=textik & " and zbozi.akce>0"
end if
if request.querystring("novinka")="on" then
textik=textik & " or zbozi.novinka=true"
end if
else
if request.querystring("akce")="on" then
textik=textik & " and zbozi.akce>0"
end if
if request.querystring("novinka")="on" then
textik=textik & " and zbozi.novinka=true"
end if
end if
textik=textik &" order by "& orderek
recordset.open textik
end if
else
if request.querystring("barva")<>"" then
recordset.open "SELECT Barvy.kodbarvy, Zbozi.Kod, Zbozi.podkategorie, Zbozi.kategorie, Zbozi.Nazev, Zbozi.Obr, Zbozi.Id FROM Zbozi INNER JOIN Barvy ON Zbozi.Kod = Barvy.kodzbozi WHERE (((Barvy.kodbarvy)='"&request.querystring("barva")&"'));"
else
if request.querystring("podkat")<>"" then
recordset.open "SELECT * FROM zbozi where zbozi.kategorie="&request.querystring("kat")&" and zbozi.podkategorie="&request.querystring("podkat")&" order by"& orderek
else
recordset.open "SELECT * FROM zbozi where zbozi.kategorie="&request.querystring("kat")&" order by"& orderek
end if
end if
end if
if recordset.eof and recordset.bof then%>
<%else
cece="bylo"
pocet=recordset.recordcount
cc=1
citac=pocet
prvni=int(pocet/3)
druha=2*prvni
treti=pocet
jojo=true
do while not recordset.eof
cc=cc+1
citac=citac-1
%><% if jojo=true then
response.write "
"
jojo=false
end if
byloidko=false
if request.querystring("idko")<>"" then
if int(request.querystring("idko"))=recordset("id") then
cidko=cc
byloidko=true
end if
end if
%>
<%if (citac=prvni) or (citac=druha) or (citac=treti) then
response.write "
"
jojo=true
end if
recordset.movenext
loop
end if
recordset.close
dbconnection.close
set recordset=nothing
set dbconnection=nothing
%>
<%if cidko<>"" then
cislo=cidko
else
cislo=2
end if%>